﻿<%@ Page Language="C#" MasterPageFile="~masterurl/custom.master" AutoEventWireup="true" Inherits="Kiiro.SiteDefinition.ProjectPages.DisplayDiscussion, Kiiro.SiteDefinition, Version=1.2.0.7, Culture=neutral, PublicKeyToken=5b2f4277f61b7816"
  MaintainScrollPositionOnPostback="true" %>

<%@ Register TagPrefix="SP" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="v2" TagName="AttachmentControl" Src="~/_controltemplates/Kiiro/AttachmentControl.ascx" %>
<%@ Register TagPrefix="v2" TagName="CustomFieldCollection" Src="~/_controltemplates/Kiiro/CustomFieldCollection.ascx" %>

<asp:Content ID="ContentTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
  <asp:Literal ID="litTitle" runat="server" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

  <script type="text/javascript">
    $(InitAttachments);
  </script>

  <div class="actionbar">
    <div class="wrap-has-tabs">
      <p class="left">
        <asp:HyperLink ID="lnkBackToDiscussions" runat="server" CssClass="icon-back" />
      </p>
      <ul class="right">
        <li id="create" runat="server" class="borderless">
          <asp:LinkButton ID="lbNewDiscussion" runat="server" Text="New Discussion" OnClick="lbNewDiscussion_Click" />
        </li>
        <li id="update" runat="server">
          <asp:LinkButton ID="lbEditDiscussion" runat="server" Text="Edit This Discussion" OnClick="lbEditDiscussion_Click" />
        </li>
        <li id="delete" runat="server">
          <asp:LinkButton ID="lbDeleteDiscussion" runat="server" Text="Delete This Discussion" OnClick="lbDeleteDiscussion_Click" />
        </li>
      </ul>
    </div>
  </div>
  <div class="focus">
    <div class="wrap">
      <div class="discussion-image">
        <asp:Image ID="imgCreatedBy" runat="server" runat="server" CssClass="userImgSmall" />
      </div>
      <div class="discussion-details">
        <div>
          <h2>
            <asp:HyperLink ID="hlCreatedBy" runat="server" />
            <asp:Label ID="lblCreatedDate" runat="server" />
          </h2>
          <h3>
            <asp:Label ID="lblDiscussionTitle" runat="server" />
          </h3>
        </div>
        <div class="wmd-editor">        
          <asp:Literal ID="litDiscussionText" runat="server" />
        </div>
      </div>
    </div>
  </div>
  <div class="body-pad">
    <div class="body">
      <div class="wrap">
        <asp:Panel ID="pnlAttachmentSettings" runat="server">
          <div class="panel-pad">
            <div class="panel">
              <div class="panel-wrap">
                <div class="panel-title">
                  <h2>
                    Attachment Settings</h2>
                </div>
                <div class="panel-content">
                  <div class="settings single-column">
                    <asp:Panel ID="pnlAttachments" runat="server" CssClass="row borderless">
                      <v2:AttachmentControl id="attachmentControl" runat="server" Title="Attachments" />
                    </asp:Panel>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </asp:Panel>
        <div class="panel-pad">
          <v2:CustomFieldCollection id="v2CustomFieldCollection" runat="server" />
          <div class="panel">
            <div class="panel-wrap">
              <div class="panel-title">
                <h2>
                  Comments</h2>
              </div>
              <div id="commentContent" runat="server" class="panel-content has-pages">
                <asp:Repeater ID="rptComments" runat="server" OnItemDataBound="rptComments_ItemDataBound">
                  <ItemTemplate>
                    <div class="comment">
                      <asp:Literal ID="commentAnchor" runat="server" />
                      <div class="comment-image">
                        <asp:Image ID="imgComment" runat="server" CssClass="userImgSmall" />
                      </div>
                      <div class="comment-body">
                        <div class="comment-title">
                          <h2 class="user">
                            <asp:HyperLink ID="hlCommentCreatedBy" runat="server" />
                            <asp:Label ID="lblCommentCreatedDate" runat="server" />
                          </h2>
                          <ul>
                            <li>
                              <asp:LinkButton ID="btnEditComment" runat="server" OnClick="btnEditComment_Click" />
                            </li>
                            <li>
                              <asp:LinkButton ID="btnDeleteComment" runat="server" OnClick="btnDeleteComment_Click" />
                            </li>
                          </ul>
                        </div>
                        <div class="comment-details">
                          <asp:Label ID="lblCommentText" runat="server" />
                          <v2:AttachmentControl id="commentsAttachmentControl" runat="server" Title="" />
                        </div>
                      </div>
                    </div>
                  </ItemTemplate>
                </asp:Repeater>
                <div id="addComment" class="comment borderless">
                  <div class="comment-image">
                    <asp:Image ID="imgCurrentUser" runat="server" CssClass="userImgSmall" />
                  </div>
                  <div class="comment-body">
                    <div class="comment-title">
                      <h3>
                        Leave A Comment <span class="required">*</span>
                      </h3>
                    </div>
                    <div class="comment-details">
                      <p>
                        <asp:TextBox ID="txtComment" runat="server" class="input" TextMode="MultiLine" Rows="3" />
                        <asp:Label ID="lblCommentMessage" runat="server" class="validation-message" />
                      </p>
                      <p>              
                        <v2:AttachmentControl id="commentsEnabledAttachmentControl" runat="server" Title="" />
                      </p>
                      <p>
                        <asp:LinkButton ID="btnAddComment" runat="server" Text="ADD COMMENT" OnClick="btnAddComment_Click">
                                            <img alt="" src="/_layouts/images/Kiiro/button-add-comment.png" />
                        </asp:LinkButton>
                      </p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</asp:Content>
